package com.zy.scwuser.controller;

import io.swagger.annotations.Api;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author: zy 690748807@qq.com
 * @Description:
 * @Date: 2024/4/23 20:13
 * @Version: 1.0
 * @name 方法名字：
 */
@Api(tags = "这是一个测试swagger2的controller")
@RestController
public class HelloController {
//    @Autowired
//    StringRedisTemplate stringRedisTemplate;
    @Resource
    private StringRedisTemplate stringRedisTemplate;
    @GetMapping("/hello")
    public String hello(String name) {
        return "OK:" + name;
    }

//    @Test
//    public void aa() {
//        stringRedisTemplate.opsForValue().set("zyy", "加66油");
//        String zyy = stringRedisTemplate.opsForValue().get("zyy");
//        System.out.println("=========hhh======");
//        System.out.println("=====zyy====" + zyy);
//
//    }
}
